import request from '@/utils/request';

/*获取区域列表接口*/
export const fetchAreaListApi = (params) => {
  return request({
    url: '/parking/area/list',
    method: 'GET',
    params,
  });
};

/*删除区域接口*/
export const deleteCardApi = (id) => {
  return request({
    url: `/parking/area/${id}`,
    method: 'DELETE',
  });
};

/*获取计费规则接口*/
export const fetchRoleDropListApi = () => {
  return request({
    method: 'GET',
    url: `/parking/rule/dropList`,
  });
};

/*添加区域接口*/
export const addAreaDropApi = (data) => {
  return request({
    method: 'POST',
    url: '/parking/area',
    data,
  });
};


/*编辑区域接口*/
export const updateAreaDropApi=(data)=>{
  return request({
    method: 'PUT',
    url: '/parking/area',
    data,
  });
}
